<%@ page pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<link href="${apliPath}static/css/default.css" rel="stylesheet"
	type="text/css" />
<link rel="stylesheet" type="text/css"
	href="${apliPath}static/js/themes/metro-solidBlue/easyui.css" />
<link rel="stylesheet" type="text/css"
	href="${apliPath}static/js/themes/icon.css" />
<script type="text/javascript" src="${apliPath}static/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="${apliPath}static/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${apliPath}static/js/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="${apliPath}static/js/md5.js"></script>
<script type="text/javascript">
	function submitForm() {
		var password = document.getElementById("password");
		//md5加密
		document.getElementById("password").value = hex_md5(password.value);
		alert(document.getElementById("password").value);
		$("#insertForm").form("submit", {
			url : "${apliPath}customer/register",
			success : function(data) {
				$.messager.show({
					title : "提示框",
					msg : "添加成功",
				});
			}
		});
		$('#insertForm').form('reset');
	}
</script>
<style>
tr {
	height: 50;
}
</style>

<span style="font-size: 40px;margin-left:50px;color:green;">添加用户</span>
<div id="customerDiv" align="center">
	<form id="insertForm" method="post"
		name="insertForm" class="easyui-form" enctype="multipart/form-data">
		<table>
			<tr>
				<td><label> 姓名: </label></td>
				<td><input name="name" class="easyui-textbox" /></td>

				<td><label> 匿名名称: </label></td>
				<td><input name="nickName" class="easyui-textbox" /></td>

			</tr>
			<tr>
				<td><label> 密码: </label></td>
				<td><input id="password" name="password" class="easyui-textbox" />
				</td>

				<td><label> 性别: </label></td>
				<td><input name="gender" class="easyui-textbox" /></td>
			</tr>
			<tr>
				<td><label> 手机: </label></td>
				<td><input name="phone" class="easyui-textbox" /></td>

				<td><label> 个性签名: </label></td>
				<td><input name="signature" class="easyui-textbox" size="40"/></td>
			</tr>
			<tr>
				<td><label> 头像: </label></td>
				<td><input name="avatarImg" type="file" /></td>

				<td><label> 家乡: </label></td>
				<td><input name="hometown" class="easyui-textbox" /></td>
			</tr>
			<tr>
				<td colspan="2"><a class="easyui-linkbutton"
					onclick="submitForm()" data-options="iconCls:'icon-ok'">submit</a>
				</td>
				<td colspan="2"><a href="javascript:;"
					class="easyui-linkbutton" id="reset"
					onclick="javascript:$('#insertForm').form('reset')"
					data-options="iconCls:'icon-reload'">reset</a>
				</td>
			</tr>


		</table>
	</form>
</div>